Ext.define('Holo.view.trip.WindowsNewTrip', {
    extend: 'Ext.window.Window',
    alias : 'widget.windowsnewtrip',
    height: 171,
    width: 332,
    layout: {
        type: 'fit'
    },
    modal:true,
    closable: true,
    resizable:false,
    title: Label.get('LAB090'),

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
	                {
	                    xtype: 'form',
                            id:'WindowsNewTripForm', //id needed the controller get lost with other form otherwize
	                    layout: {
	                        align: 'center',
	                        pack: 'center',
	                        type: 'vbox'
	                    },
	                    bodyPadding: 10,
	                    frameHeader: false,
	                    items: [
	                        {
	                            xtype: 'textfield',
	                            name: 'name',
	                            allowBlank: false,
	                            blankText:Error.get('ERR005'),
	                            maxLength:60,
	                            maxLengthText:Error.get('ERR003'),
	                            minLength:3,
	                            minLengthText:Error.get('ERR002'),
	                            fieldLabel: Label.get('LAB051')
	                        },
	                        
	                    ],
	                   
	                    buttons :[{
                                        text: Label.get('LAB901'),
                                        action:'createtrip',
                                        formBind: true, //only enabled once the form is valid
                                        disabled: true
            	                    }]
                        
                     
                    
                }
            ]
        });

        me.callParent(arguments);
    }

});